﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Input;
using Ay.MvcFramework;
using Hotel.UI.Common;
//using Hotel.UI.Common.Services;
using Hotel.UI.Models;

namespace  Hotel.UI.Controllers
{
    public class LoginController : Controller
    {
        public LoginModel Model { get; set; } = new LoginModel();
        public LoginController() : base()
        {

        }



        /// <summary>
        /// 无注释
        /// </summary>
        public ActionResult Login { get; private set; } = inParam =>
        {


            //UnityContainerManager.Resolve<ServicerManager>().GetService("getget", "adfa", (obj) =>
            //{
            //    System.Diagnostics.Trace.WriteLine($"{DateTime.Now}:" + obj.ToString());

            //    AYUI.Message.Send("", MESSAGES.CloseLoginWiew);
            //});
            //var p = inParam as object[];
            //var asdf = AYUI.Session["test"];
            //   //登录成功,发送"关闭命令"
            //   AYUI.Message.Send("", MESSAGES.CloseLoginWiew);
        };

        public ActionResult Close { get; set; } = inParam =>
        {
            //UnityContainerManager.Resolve<ServicerManager>().GetService("myroute", "adfa", (response) => { System.Diagnostics.Trace.WriteLine($"{DateTime.Now}:" + response.Message); });
            //UnityContainerManager.ServicerManager.GetService("getset","adfa22", null);
            //AYUI.Session ["test"] = inParam;
        };
        public ICommand TestCommand
        {
            get
            {
                return new DelegateCommand((obj) =>
                {

                    var re = 0;

                });
            
            }
        }
    }
}
